// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_BOM_TECHNIC_ITEM_MTRL
// * CreateDate    : 2014-06-05 18:29:41
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:29:41
// * LastChanger   : 2014-06-05 18:29:41
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class BomTechnicItemMtrlEntity : EntityBase
    {
        public BomTechnicItemMtrlTable TableSchema
        {
            get
            {
                return BomTechnicItemMtrlTable.Current;
            }
		}
		
		public BomTechnicItemMtrlEntity()
        {

        }
		
		public BomTechnicItemMtrlEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["Id"]));
			this.BomTechnicItemId = Convert.ToString(CommonFunctions.ToObject(dr["Bom_Technic_Item_Id"]));
			this.BomTechnicId = Convert.ToString(CommonFunctions.ToObject(dr["BOM_TECHNIC_ID"]));
			this.TechnicCode = Convert.ToString(CommonFunctions.ToObject(dr["Technic_Code"]));
			this.MtrlId = Convert.ToString(CommonFunctions.ToObject(dr["Mtrl_Id"]));
			this.MtrlName = Convert.ToString(CommonFunctions.ToObject(dr["Mtrl_Name"]));
			this.MtrlCode = Convert.ToString(CommonFunctions.ToObject(dr["Mtrl_Code"]));
			this.ReqQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["Req_Qty"]));
			this.Unit = Convert.ToString(CommonFunctions.ToObject(dr["Unit"]));
			this.MtrlgroupNo = Convert.ToString(CommonFunctions.ToObject(dr["MTRLGROUP_NO"]));
			this.MtrlgroupName = Convert.ToString(CommonFunctions.ToObject(dr["MTRLGROUP_NAME"]));
        }
		
		public BomTechnicItemMtrlEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["Id"]));
			this.BomTechnicItemId = Convert.ToString(CommonFunctions.ToObject(dr["Bom_Technic_Item_Id"]));
			this.BomTechnicId = Convert.ToString(CommonFunctions.ToObject(dr["BOM_TECHNIC_ID"]));
			this.TechnicCode = Convert.ToString(CommonFunctions.ToObject(dr["Technic_Code"]));
			this.MtrlId = Convert.ToString(CommonFunctions.ToObject(dr["Mtrl_Id"]));
			this.MtrlName = Convert.ToString(CommonFunctions.ToObject(dr["Mtrl_Name"]));
			this.MtrlCode = Convert.ToString(CommonFunctions.ToObject(dr["Mtrl_Code"]));
			this.ReqQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["Req_Qty"]));
			this.Unit = Convert.ToString(CommonFunctions.ToObject(dr["Unit"]));
			this.MtrlgroupNo = Convert.ToString(CommonFunctions.ToObject(dr["MTRLGROUP_NO"]));
			this.MtrlgroupName = Convert.ToString(CommonFunctions.ToObject(dr["MTRLGROUP_NAME"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return BomTechnicItemMtrlTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(BomTechnicItemMtrlTable.C_Id)); }
            set { SetData(BomTechnicItemMtrlTable.C_Id, value); }
        }
		
        [DataMember]
        public string BomTechnicItemId
        {
            get { return Convert.ToString(GetData(BomTechnicItemMtrlTable.C_Bom_Technic_Item_Id)); }
            set { SetData(BomTechnicItemMtrlTable.C_Bom_Technic_Item_Id, value); }
        }
		
        [DataMember]
        public string BomTechnicId
        {
            get { return Convert.ToString(GetData(BomTechnicItemMtrlTable.C_BOM_TECHNIC_ID)); }
            set { SetData(BomTechnicItemMtrlTable.C_BOM_TECHNIC_ID, value); }
        }
		
        [DataMember]
        public string TechnicCode
        {
            get { return Convert.ToString(GetData(BomTechnicItemMtrlTable.C_Technic_Code)); }
            set { SetData(BomTechnicItemMtrlTable.C_Technic_Code, value); }
        }
		
        [DataMember]
        public string MtrlId
        {
            get { return Convert.ToString(GetData(BomTechnicItemMtrlTable.C_Mtrl_Id)); }
            set { SetData(BomTechnicItemMtrlTable.C_Mtrl_Id, value); }
        }
		
        [DataMember]
        public string MtrlName
        {
            get { return Convert.ToString(GetData(BomTechnicItemMtrlTable.C_Mtrl_Name)); }
            set { SetData(BomTechnicItemMtrlTable.C_Mtrl_Name, value); }
        }
		
        [DataMember]
        public string MtrlCode
        {
            get { return Convert.ToString(GetData(BomTechnicItemMtrlTable.C_Mtrl_Code)); }
            set { SetData(BomTechnicItemMtrlTable.C_Mtrl_Code, value); }
        }
		
        [DataMember]
        public decimal ReqQty
        {
            get { return Convert.ToDecimal(GetData(BomTechnicItemMtrlTable.C_Req_Qty)); }
            set { SetData(BomTechnicItemMtrlTable.C_Req_Qty, value); }
        }
		
        [DataMember]
        public string Unit
        {
            get { return Convert.ToString(GetData(BomTechnicItemMtrlTable.C_Unit)); }
            set { SetData(BomTechnicItemMtrlTable.C_Unit, value); }
        }
		
        [DataMember]
        public string MtrlgroupNo
        {
            get { return Convert.ToString(GetData(BomTechnicItemMtrlTable.C_MTRLGROUP_NO)); }
            set { SetData(BomTechnicItemMtrlTable.C_MTRLGROUP_NO, value); }
        }
		
        [DataMember]
        public string MtrlgroupName
        {
            get { return Convert.ToString(GetData(BomTechnicItemMtrlTable.C_MTRLGROUP_NAME)); }
            set { SetData(BomTechnicItemMtrlTable.C_MTRLGROUP_NAME, value); }
        }
		
		#endregion
	}
	
	
}	

